package com.yonyou.common.service.messagecenter.rabbitmq.demo;

import java.io.IOException;
import java.util.Map;
import java.util.concurrent.TimeoutException;

import org.springframework.stereotype.Service;

import com.yonyou.common.service.messagecenter.rabbitmq.MessageConsumer;

@Service
public class CobsumerDemo extends MessageConsumer{

	public CobsumerDemo() throws IOException, TimeoutException{
		super("queue2");
	}
	@Override
	public boolean listen(String protocol,Map<String,String> result) {
		System.out.println("-----messsage do ok-----"+protocol.toString());
		//true 处理成功
		return true;
	}

}
